﻿using System.Collections.Generic;
using System.Web.Mvc;
using Blog.Core.Entities;
using Blog.Infrastructure.DataAcces.Services.Abstractisations;

namespace Blog.Controllers
{
    [HandleError]
    public class HomeController : Controller
    {
        private IArticleService articleService;

        public HomeController(IArticleService articleService)
        {
            this.articleService = articleService;
        }

        public ActionResult Index()
        {

           return View("Index");

        }

        public ViewResult About()
        {
            return View();
        }

        public ViewResult Sitemap()
        {
           return View(articleService.GetAll());
        }

        public ViewResult Error()
        {
            return View();
        }

    }
}
